<!DOCTYPE html>
<html dir="ltr" lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
    <title>Stencil Component Starter</title>
    <style>
      html,
      body {
        height: 100%;
        width: 100%;
      }
      * {
        margin: 0px;
        padding: 0px;
      }

      ibz-terminal-tab {
        height: calc(100vh - 50px);
      }
    </style>
    <!-- <link rel="stylesheet" href="./build/ibz-terminal.css" /> -->
    <!-- <link rel="stylesheet" href="./assets/css/reset.css" /> -->

    <script type="module" src="./build/ibz-terminal.esm.js"></script>
    <script nomodule src="./build/ibz-terminal.js"></script>
  </head>
  <body>
    <ibz-terminal-tab id="terminalTab"></ibz-terminal-tab>
    <script>
      window.onload = function () {
        const group = document.getElementById('terminalTab');
        setInterval(() => {
          const gms = group.gms;
          gms.write({
            type: 'CONSOLE',
            content: '测试消息：类型-默认',
          });
          gms.write({
            type: 'CONSOLE',
            subtype: '用户消息',
            content: '测试消息：类型-用户消息',
          });
          gms.write({
            type: 'CONSOLE',
            subtype: '用户消息',
            content: '测试消息：类型-用户消息-2',
          });
          gms.write({
            type: 'CONSOLE',
            subtype: '全局消息',
            content: '测试消息：类型-全局消息',
          });
          gms.write({
            type: 'CONSOLE',
            subtype: '全局消息',
            content: '测试消息：类型-全局消息-2',
          });
        }, 100);
      };
    </script>
    <!-- <ibz-terminal id="terminal"></ibz-terminal> -->
    <!-- <script src="./assets/examples/js/index.cjs"></script> -->
    <!-- <script>
      window.onload = function () {
        const terminal = document.getElementById('terminal');
        let num = 1;
        if (terminal) {
          setInterval(() => {
            terminal.ms.progress(num);
            num++;
            if (num > 20) {
              num = 0;
              terminal.ms.writeln('');
            }
          }, 100);
        }
      };
    </script> -->
  </body>
</html>
